<%@ page language="java" pageEncoding="UTF-8"
	import="com.cdshop.web.PageUtil,com.cdshop.web.NavigatorService,com.cdshop.web.auth.AuthenticateService"%>
<%
	String username = request.getParameter("username");
	String password = request.getParameter("password");
	response.setContentType("text/jason");
	AuthenticateService auth = AuthenticateService.instance();
	password = auth.hash(password);
	if (auth.login(session, username, password)) {
		out.write(PageUtil.json().add("ret", true).value());
	} else {
		out.write(PageUtil.json().add("ret", false).value());
	}
	out.flush();
%>